import { get, post,postFormData} from './http'

//基地下拉
export const soil_findAllBase = p => get("/soil/findAllBase/",p)//查询基地下拉
export const soil_findSoilByType = p => post("/soil/findSoilByType/",p)//根据基地类型查询下拉

//养殖管理
//养殖列表
export const breed_findByList = p => post("/breed/findByList",p)
//新增养殖

export const breed_save = p => post("/breed/save",p)
export const breed_update = p => post("/breed/update",p)
//报损
export const breed_loss = p => post("/loss/save",p)
//根据ID查询养殖详情
export const breed_findById = p => get("/breed/findById/",p)
//根据养殖ID和查询条件查询养殖详情
export const breed_detail_findByList = p => post("/breedDetail/findByList",p)
//根据养殖ID和查询条件查询喂养列表
export const feed_findByList = p => post("/feed/findByList",p)
//根据养殖ID和查询条件查询报损列表
export const loss_findByList = p => post("/loss/findByList",p)
//喂养新增
export const feed_save = p => post("/feed/save",p)
//根据投入品类型查询投入品下拉
export const breedInputs_findByType = p => post("/breedInputs/findByType",p)
//根据投入品名称查询投入品批号下拉
export const breedInputs_findByInputsName = p => post("/breedInputs/findByInputsName",p)

export const breedInputs_findInputsByType = p => post("/breedInputs/findInputsByType",p)


export const breed_findBatchSelect = p => get("/breed/findBatchSelect",p)

//繁殖管理
export const born_findByList = p => post("/born/findByList",p)//繁殖列表
export const born_save = p => post("/born/save",p)//新增繁殖
export const born_findByTypeAndCode = p => post("/born/findByTypeAndCode",p)//根据类型和编码查询详情
export const born_findById = p => get("/born/findById/",p)//根据ID查询繁殖详情
export const born_delete = p => get("/born/delete/",p)//根据ID查询繁殖详情
export const born_inCode = p => postFormData("born/inCode",p) //母源的导入文件

export const born_findByBatch = p => get("breedDetail/findByBatch/",p)

//投入品管理
export const inputs_findByList = p => post('/breedInputs/findByList', p); //列表
export const inputs_findByLogList = p => post('/breedInputs/findByLogList', p); //使用列表
export const inputs_save = p => postFormData('/breedInputs/save',p)
export const inputs_delete = p => get('/breedInputs/delete/', p);//删除
export const inputs_findById = p => get('/breedInputs/findById/', p); //根据ID查看
export const inputs_findByAll = p => get('/breedInputs/findByAll',p) //获取所以投入品品名
//产出物管理
export const crop_save = p => post('/breedCrop/save', p);//新增
export const crop_findByList = p => post('/breedCrop/findByList', p); //列表
export const crop_findByDetailList = p => post('/breedCrop/findByDetailList', p); //明细列表
export const crop_findById = p => get('/breedCrop/findById/', p); //根据ID查看
export const crop_delete = p => get('/breedCrop/delete/', p);//删除
export const crop_deleteDetail = p => get('/breedCrop/deleteDetail/', p);//删除明细
export const crop_getBreedDetail = p => post('/breedCrop/getBreedDetail', p);//根据编码类型获取品种信息
//防疫管理
export const prevent_save = p => post('/prevent/save', p);//新增
export const prevent_findByList = p => post('/prevent/findByList', p); //列表
export const prevent_findById = p => get('/prevent/findById/', p); //根据ID查看
export const prevent_delete = p => get('/prevent/delete/', p);//删除

//检疫管理
export const quarantine_findById = p => get('/quarantine/findById/', p); //根据ID查看
export const quarantine_save = p => postFormData('/quarantine/save', p);//新增
//出场管理
export const out_save = p => post('/out/save', p);//新增
export const out_findById = p => post('/out/findById/', p);//根据ID查询详情
export const out_findByTypeAndCode = p => post('/out/findByTypeAndCode', p);//根据类型和编码集合查询数据
export const out_findByList = p => post('/out/findByList', p);//查询列表出场
export const outDetail_findByList = p => post('/outDetail/findByList', p);//查询出场详情列表

//订单管理
// export const order_findByList = p => post('/order/findByList', p);//查询列表订单
export const order_findByList = p => post("clientorder/search",p)// 订单列表 
// export const order_save = p => post('/order/save', p);//新增
export const order_save = p => post("clientorder/add",p)//新增订单       


export const product_findOwnAll = p => get("product/findOwnAll",p)
export const order_findById = p => get("clientorder/load/",p)   //根据id查询详情
export const order_update = p => post("order/update",p)
export const order_delete = p => get("clientorder/dele/",p)//删除 

// 权限管理
export const resource_company_appMenus = p => get("/resource/load/company/appmenus/",p)//根据 公司id 查询 权限
export const resource_user_appMenus = p => get("/resource/load/user/appmenus/",p)//根据 用户id 查询点击用户 所拥有的的 权限
export const resource_set_appMenus = p => post("/resource/set/user/appmenus",p)//保存 权限


// 数字地图

export const map_save = p => post("basesoil/add",p)//保存
// export const map_save = p => post("/soil/save",p)//保存
// export const map_findByList = p => get("/soil/findAll",p)//获取所有
export const map_findByList = p => get("basesoil/init",p)//地图初始化
// export const map_findByList = p => get("basesoil/loadroot",p)//所有基地

export const map_findAllCoordinate = p => get("/motionTrail/findAllCoordinate",p) 

// export const soil_findByBaseId = p => get("/soil/findByBaseId/",p) //根据句基地id 查询 地块
export const soil_findByBaseId = p => get("basesoil/load/",p) //根据基地id 查询 地块

export const soil_bind = p => post("soil/bind",p)//  绑定设备
export const soil_findList3Days = p => post("/findList3Days",p)// 获取近3天的气象数据 


//生产系统 > 生产计划

export const productionPlan_added = p => post("/process/save",p) //新增生产计划
export const productionPlan_modify = p => post("/process/update",p) //修改生产计划
// export const productionPlan_search = p => post("/process/selectId/",p) //根据id查询基本信息和原料辅料
export const productionPlan_search = p => post("/process/inquire",p) //查询所有
// export const productionPlan_search = p => post("/process/search",p) //搜索栏
export const productionPlan_delete = p => post("/process/delete",p) //删除生产计划
// 成本管理
// /inputs/getCostTable
export const inputs_getCostTable = p => get("/inputs/getCostTable",p) //根据基地id 查询 地块